import { default as utils, addNumber } from './utils.js'
import { version, author } from '../package.json'
import { compact } from 'lodash-es'
import { greet } from '@/commonjs/common.cjs'

import * as bableTest from '@/babeljs/index.js'
import * as tsTest from '@/typescript/index.js'
export const printAnswer = bableTest.printAnswer

const buildTime = '__build_time__'
export const indexFn = function () {
  utils.foo()
  const result = addNumber(2, 2, 9, 1.09)

  console.log('当前包的版本号是：', version)
  console.log('当前包的作者是：', author)
  console.log('main end...', result)
  console.log('lodash-es方法:', compact([0, 1, false, 2, '', 3]))
  console.log(greet('test, commonjs'))
  console.log('__helloworld__, \t -<')
  console.log(buildTime)
}

export const test123 = 'aaa'
console.log('🚀💥💥 ~ test123: --》》', test123)
console.log('====tstest=====')
console.log(Object.keys(tsTest))
console.log(tsTest.default(12, 70))
console.log('====tstest=====')
console.log('🚀💥💥 ~ printAnswer: --》》', printAnswer)
tsTest.attribute(true)
export default {
  indexFn,
  addNumber,
  printAnswer,
  add: tsTest.add,
  attribute: tsTest.attribute
}
